package com.utc.fjc.command.oemimport;

import java.util.ArrayList;
import java.util.List;

import com.utc.teamcenter.common.app.excel.CellInfo;

public class OemImportLog {
	
	private String item_id = "";
	private String item_revision_id = "";
	private String result = "";
	private String message = "";
	
	public OemImportLog() {
		super();
	}
	
	public OemImportLog(String itemId, String itemRevisionId, String result,
			String message) {
		super();
		item_id = itemId;
		item_revision_id = itemRevisionId;
		this.result = result;
		this.message = message;
	}

	public String getItem_id() {
		return item_id;
	}

	public void setItem_id(String itemId) {
		item_id = itemId;
	}

	public String getItem_revision_id() {
		return item_revision_id;
	}

	public void setItem_revision_id(String itemRevisionId) {
		item_revision_id = itemRevisionId;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
	public static List<CellInfo> getCellInfo(int row,
			List<OemImportLog> infos) {
		List<CellInfo> cells = new ArrayList<CellInfo>();

		if (infos != null) {
			for (OemImportLog logInfo : infos) {
				int col = 0;
				cells.add(new CellInfo(row, col++, logInfo.getItem_id()));
				cells.add(new CellInfo(row, col++, logInfo.getItem_revision_id()));
				cells.add(new CellInfo(row, col++, logInfo.getResult()));
				cells.add(new CellInfo(row, col++, logInfo.getMessage()));
				row++;
			}
		}

		return cells;
	}
	
	

}
